<template>
	<view class="device-item" @click="itemClick">
		<view class="item-left">
			<view>{{device.name}}</view>
			<view class="text">{{device.busNo}}</view>
		</view>
		<view class="item-mid">
			<view class="color">{{device.mac}}</view>
		</view>
		<view class="color">{{device.no}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		props: {
			device: {
				type: Object,
				default: () => {}
			}
		},
		methods: {
			itemClick() {
				this.$emit('deviceClick', this.device.no)
			}
		}
	}
</script>

<style scoped lang="scss">
	.device-item {
		display: flex;
		flex-direction: row;
		align-items: flex-start;
		justify-content: space-between;
		padding: 30rpx;
		border-bottom: 1px solid #e9e9e9;

		.item-mid {
			flex: 1;
		}
		.text {
			margin-top: 12rpx;
			color: #999999;
			font-size: 26rpx;
		}

		.color {
			color: #666666;
		}

	}
</style>
